// 账号密码台账
const sequelize = require('../config.js')
const { DataTypes } = require('sequelize')

const userledger = sequelize.define('userledger', {
	Id:{
		type: DataTypes.INTEGER,
		primaryKey: true,
		autoIncrement: true
	},
	user_name: {
	  type: DataTypes.STRING,
	  allowNull: true,
	  comment: '用户名'
	},
	user_password: {
	  type: DataTypes.STRING,
	  allowNull: true,
	  comment: '用户密码'
	},
	creator_id:{
		type:DataTypes.INTEGER,
		comment:'创建者'
	},
	is_flg:{
		type:DataTypes.STRING,
		comment:"账号身份 1超管 2商家 3业务员 4会员"
	}
  },{timestamps: false});
  (async () => {
	await userledger.sync({alter:true});
  })()

module.exports = userledger